﻿
using System.Collections.Generic;
using MiniWeb.Core.Dtos;
using MiniWeb.Core.Entities;
using MiniWeb.Dao;
using MiniWeb.Core.Entities;
using WFramework.MvcPager;

namespace MiniWeb.Task
{
	public  class ProductsImgInfoTask
	{
	     private readonly ProductsImgInfoDao _dao = new ProductsImgInfoDao();
	     public PagedList<ProductsImgInfo> GetPagedList(int? pid,int pageIndex, int pageSize)
        {
            return _dao.GetPagedList(pid,pageIndex,pageSize);
        }
        
         	     
	     
        
         public ProductsImgInfo GetById(int id)
        {
            return _dao.GetById(id);
        }
        
          public void Delete(int id)
        {
            
            _dao.Delete(id);
        }
        
   		     
		public bool Exists(int id)
		{
			
            return _dao.Exists(id);
		}
		
		public void Add(ProductsImgInfo model)
		{
			
             _dao.Add(model);
		}
		
		public void Update(ProductsImgInfo model)
		{
			
             _dao.Update(model);
		}
		
		 public List<ProductsImgInfo> GetAll(int? top, string strwhere,string orderby)
        {
            return _dao.GetAll(top, strwhere, orderby);
        }

         public List<ProductsImgInfo> GetAll(int pid)
         {
             return _dao.GetAll(pid);
         }


	}
}